<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--【备注】手机浏览识别，以上4个元标记*必须*在头部；-->
		<title>老司机</title>
		<!--标准mui.css，公共样式-->
		<link rel="stylesheet" href="../css/mui.min.css" />
		<link href="../css/iconfont/iconfont.css" rel="stylesheet" />
		<link href="../css/public.css" rel="stylesheet" />
		<!--自定义个人端样式-->
		<link rel="stylesheet" type="text/css" href="../css/map/stype.css" />
		<link rel="stylesheet" type="text/css" href="../css/order.css" />
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=A8773a52f6d9bc0ecaea7f15acdd13e0"></script>
	</head>

	<body>
		<!-- 主页面标题 -->
		<header class="mui-bar mui-bar-nav">
			<a id="show-btn" class="mui-icon iconfont mui-pull-left color9 m_t5 icon-iconfontmy"></a>
			<h1 class="mui-title colorP">老司机</h1>
			<a class="mui-icon iconfont mui-pull-right color9 icon-defaraxitongtongzhi"></a>
		</header>
		<div class="mui-content">
			<div class="fixed">
				<form class="mui-input-group m_r15">
					<div class="mui-input-row b_b1">
						<label><span class="iconfont mui-icon font18 colorP icon-dian-copy"></span></label>
						<input type="text" class="mui-input-clear font14 mui-pull-left" id="initial_position" placeholder="正在获取当前位置" value="">
					</div>
					<div class="mui-input-row">
						<label><span class="iconfont mui-icon font18 color_orange icon-dian-copy"></span></label>
						<input type="text" class="w80 mui-pull-left font14" id="map_num" placeholder="请输入目的地">
						<b style="font-weight: normal;color: red;" id="info"></b>
					</div>
				</form>
				<div class="mui-mid p_tb11_lr15">
					<div class="small_cash">
						<p>小费：</p><input id="call_driver" class="mui-numbox-input font14" type="number" placeholder="0" value=""><span class="company_cash">元</span></div>
					<span class="mui-h5 font12" style="margin-left: -4px;">(小费金额在5-200元之间 )</span>
				</div>
				<div class="mui-mid p_tb11_lr15">
					<button type="button" class="mui-btn mui-btn-green w60 p_tb11_lr15 font16 bg_green b_r8" onclick="gotoOrgder()">立即下单</button>
					<button type="button" class="mui-btn mui-btn-grey w35 p_tb11_lr15 font16 bg_grey b_r8" onclick="tool.openNewPage('passenger.html')">代叫</button>
				</div>
			</div>
			<div class="content" id="allmap"></div>
			<div id="div_show"></div>
			<div id="maplocation" style="display:none;">
				<label for="mapx">X坐标</label>
				<input onchange="" type="text" id="mapx" name="mapx" value="" />
				<label for="mapy">Y坐标</label>
				<input type="text" id="mapy" name="mapy" value="" />
				<div><input type="submit" value="保存地图设置" id="saveMap" style="float:left;" />
					<font id="mapmag"></font>
				</div>
			</div>
		</div>
	</body>
	<!-- Mui core JavaScript-->
	<script type="text/javascript" src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/jquery-2.2.4.min.js"></script>
	<script type="text/javascript" src="../js/appconfig.js"></script>
	<!--侧滑-->
	<script type="text/javascript" src="../js/offcanvas/Sideleft.js"></script>
	<script src="../js/map/home.js" type="text/javascript" charset="utf-8"></script>
	<script>
		mui.init();
		//消息
		$('.icon-defaraxitongtongzhi').on("tap", function() {
				tool.openNewPage('message.html');
			})
			//马上推荐
		function Recom() {
			tool.openNewPage('my_recommend.html');
		}
		function gotoOrgder(){
			var ends=$.trim($("#map_num").val());
			var star=$.trim($("#initial_position").val());
			var tip=$.trim($("#call_driver").val());
			alert(tip);
			if(ends.length!="0"){
					if(typeof(Storage) !== "undefined") {
						localStorage.ID = ends;
						localStorage.name=star;
						localStorage.setItem("tips",tip);
						
					}
				tool.openNewPage('Immediate.html');	
				
			}else{
				alert("目的地不能为空");
			}
			
		} 
		//司机信息
		function Cars() {
			tool.openNewPage('driver_info.html');
		}
		//地图高度
		var h = $(window).height() - 45;
		$('.mui-content').css("height", h + "px");
		//判断起始位置是否有值
		$('#initial_position').on('blur', function() {
			if($(this).val() == "") {
				mui.toast('请输入起始位置');
				return;
			} else {
				//判断起始位置没有值
				if($('#initial_position').val() != "" && $('#map_num').val() != "") {
					$('#call_driver').attr('disabled', false);
				}
			}
		});
	</script>
</html>